import sys
from spass.core.commands import parse_commande, is_inited
from spass.core.db.init_db_core import db_connect

def usage():
    print 'Usage : spass <order> [options...]'

def main():
    if len(sys.argv) < 2:
        usage()
        sys.exit(1)
    elif is_inited(sys.argv):
        db_connect()
        ret = parse_commande(sys.argv)
        sys.exit(ret)

if __name__ == "__main__":
    main()
        

